// src/App.js
import React, { Component } from 'react';
import { Button,Layout} from 'antd';
import { BrowserRouter, Route, Link } from "react-router-dom";

import Header from './components/Header'
import Create from './pages/Create';
import Course from './pages/Course';
import Detail from './pages/Detail';
import Qa from './pages/Qa';
// 解决样式问题
// import './App.css';


const {Footer, Content} = Layout;
// const Course = () => <span>课程</span>;
// const Create = () => <span>我要众筹</span>;
// const Qa = () => <span>问答区</span>;


class App extends Component {
    render() {

        return (
           <Layout>
               <Header>header</Header>
                   <Content>
                       <Route path="/" exact component={Course}></Route>
                       <Route path="/qa" component={Qa}></Route>
                       <Route path="/create" component={Create}></Route>
                       {/*冒号表示address是一个变量*/}
                       <Route path="/detail/:address" component={Detail}></Route>
                   </Content>
               <Footer>footer</Footer>
            </Layout>
        );
    }
}

export default App;
